-- GENERATED SPELL FOR [Hellfire Imp] --


function spell0_17477(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(16144,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17477', 589, 1)
end

function spell1_17477(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17477', 3000, 1)
end

function spell2_17477(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17477', 3000, 1)
end

function Sorts_17477(pUnit, Event)
local choix_sorts_17477 = math.random(0, 2)
if choix_sorts_17477 == 0 then
pUnit:RegisterEvent('spell0_17477', 1, 1)
end
if choix_sorts_17477 == 1 then
pUnit:RegisterEvent('spell1_17477', 1, 1)
end
if choix_sorts_17477 == 2 then
pUnit:RegisterEvent('spell2_17477', 1, 1)
end
end

function mob17477_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17477', math.random(1500, 3000), 1)
end

function mob17477_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17477_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17477_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17477, 1, 'mob17477_Action')
RegisterUnitEvent(17477, 2, 'mob17477_Leave')
RegisterUnitEvent(17477, 3, 'mob17477_Kill')
RegisterUnitEvent(17477, 4, 'mob17477_Die')
